package shootingtactics.client.core;

public class Position{

    double posX;

    double posY;

    double width;

    double height;

    double radius;

    public Position(double posX, double posY){
        this.posX = posX;
        this.posY = posY;
    }

    public void setPosition(double posX, double posY){
        this.posX = posX;
        this.posY = posY;
    }

    public void setRadius(double radius){
        this.radius = radius;
    }

    public void setSize(double width, double height){
        this.width = width;
        this.height = height;
    }
    
    public double getPositionX(){
        return posX;
    }
    
    public double getPositionY(){
        return posY;
    }

    public double getDrawPositionX(){
        if(width != 0){
            return posX - (width / 2);
        }else{
            return posX - (radius / 2);
        }
    }

    public double getDrawPositionY(){
        if(height != 0){
            return posY - (height / 2);
        }else{
            return posY - (radius / 2);
        }
    }

    public double getRadius(){
        return radius;
    }

    public double getWidth(){
        return width;
    }

    public double getHeight(){
        return height;
    }
}
